<input id="excelFile" type="file"
       onchange="showFileName(this);"
       style="display:none">
<div class="input-group input-append col-sm-6">
    <input id="photoCover" class="form-control alert alert-default" type="text"
           disabled>
    <span class="input-group-btn">
                            <button class="btn " style="background-color: #0fb2fc" type="button" onclick="selectFile();">选择文件</button>
                    </span>
</div>
<script type="text/javascript">
    function showFileName(obj) {
        let file = $(obj).val();
        let fileName = file.substring(file.lastIndexOf('\\') + 1);
        $('#photoCover').val(fileName);
    }

    function selectFile() {
        $('input[id=excelFile]').click();
    }
</script>